//
//  ViewController.m
//  重写 20151126
//
//  Created by blue on 15-11-26.
//  Copyright (c) 2015年 sxh. All rights reserved.
//

#import "ViewController.h"
#import "inputTableViewController.h"


@interface ViewController ()
{
    NSArray *name;
    NSArray *tels;

}
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.title = @"苏苏的通讯录";
    name = @[
             @"萌萌",
             @"565",
             @"苏苏",
             
             ];
    tels = @[
             @"15292198801",
             @"13786508854",
             @"13855566665",
             ];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return name.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
    cell.textLabel.text = name[indexPath.row];
    cell.detailTextLabel.text = tels[indexPath.row];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath: indexPath animated:YES];
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
